package com.lswms.service;

import com.lswms.common.page.PageInfo;
import com.lswms.common.page.PageRequest;
import com.lswms.common.service.CrudService;
import com.lswms.dto.YnUserDTO;
import com.lswms.dto.vo.req.LoginReq;
import com.lswms.dto.vo.req.UpdateUserInfoReq;
import com.lswms.dto.vo.resp.LoginResp;
import com.lswms.entity.YnUserEntity;

import javax.servlet.http.HttpServletRequest;

import java.util.List;

/**
 * 用户表
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2020-04-25
 */
public interface YnUserService extends CrudService<YnUserEntity, YnUserDTO> {

	/**
	 * 登录注册
	 * @param dto
	 * @return
	 */
	public LoginResp login(LoginReq dto,HttpServletRequest request);
	/**
	 * 获取用户信息
	 * @return
	 */
	public YnUserDTO userInfo(String userId);
	
	/**
	 * 用户信息
	 * @param userId
	 * @return
	 */
	public YnUserDTO queryUserInfo(YnUserEntity ynuser);
	
	/**
	 * 修改用户信息
	 * @param dto
	 * @param request
	 */
	public void updateUserInfo(UpdateUserInfoReq dto,HttpServletRequest request,YnUserEntity ynuser);
	/**
	 * 上传图片
	 * @param request
	 */
	public String uploadImage(HttpServletRequest request);

	/**
	 * 根据条件查询所有用户
	 * @param sTime
	 * @param eTime
	 * @return
	 */
	public PageInfo<YnUserEntity> queryByCondition(PageRequest dto, String sTime, String eTime);
	/**
	 * 每日数据
	 * @param s
	 * @param e
	 * @return
	 */
	public String udata(String s,String e);

}